package basic;

import java.util.*;
import java.util.stream.IntStream;

/**
 * @Author: 海琳琦
 * @Date: 2021/9/7 20:19
 */
public class Title136 {
    public static void main(String[] args) {
        int[] nums={2,2,1};
        System.out.println(singleNumber(nums));
    }

    private static int singleNumber(int[] nums) {
        int ans = 0;
        for (int num : nums) {
            ans ^= num;
        }
        return ans;
    }
}
